# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        博智科技  
# Name:         brower2
# Description:
# Author:       yzl
# Date:         2019-05-10
#-------------------------------------------------------------------------------

import webbrowser

URL = None

def ove_open(url):
     '''webbrowser.open().'''
     if url is not None and url != '':
         return webbrowser.open(url)
     else:
         print('the URL is None or Empty!')

def ove_open_new(url):
     '''webbrowser.open_new().'''
     if url is not None and url != '':
         return webbrowser.open_new(url)
     else:
         print('the URL is None or Empty!')

def ove_open_new_tab(url):
     '''webbrowser.open_new_tab().'''
     if url is not None and url != '':
         return webbrowser.open_new_tab(url)
     else:
         print('the URL is None or Empty!')

def ove_get():
     return webbrowser.get()

def open():
     ove_open(URL)

def open_new():
     ove_open_new(URL)

def open_new_tab():
     ove_open_new_tab(URL)

def get():
     type_name = ove_get()
     print(type_name)

def init():
     global URL
     URL = 'http://m.lagou.com/search.html'

def main():
     init()
     open()
     open_new()
     open_new_tab()
     get()

if __name__ == '__main__':
    main()